Import('RTT_ROOT')
Import('rtconfig')
from building import *

cwd = GetCurrentDir()

# add the general drivers.
src = Glob('src/*.c')
path =  [cwd+'/inc']

if GetDepend(['CELLULAR_USING_CMUX']):
    src += Glob('cmux/*.c')
    path +=  [cwd+'/cmux']

if GetDepend(['CELLULAR_USING_SMS']):
    src += Glob('sms/*.c')
    path +=  [cwd+'/sms']

if GetDepend(['CELLULAR_USING_SLM750']):
    src += [cwd+'/vendor/slm750.c']

if GetDepend(['CELLULAR_USING_QUECTEL_EC20']):
    src += [cwd+'/vendor/EC20.c']

if GetDepend(['CELLULAR_USING_QUECTEL_EC600S']):
    src += [cwd+'/vendor/EC600S.c']

if GetDepend(['CELLULAR_USING_SAMPLE']):
    src += [cwd+'/sample/dial_sample.c']
    path +=  [cwd+'/sample']

group = DefineGroup('libs/cellular_device', src, depend = ['RT_USING_CELLULAR_DEVICE'], CPPPATH = path)

Return('group')
